{% extends "base.html" %}

{% block page_header %}
	{{site.name}} logs
{% endblock %}

{% block content %}
	<ul class="breadcrumb">
 	     <li><a href="/django_logs">Home</a> <span class="divider">/</span></li>
 	     <li><a href="/django_logs/sites">Sites</a> <span class="divider">/</span></li>
	     <li class="/django_logs/sites/{{site.id}}"> {{site.name}}</li>
        </ul>
{% if allreports %}
    <table class="table table-striped table-bordered table-condensed">
		<tr>
		<th>site</th>
		<th>ip address</th>
		<th>date time</th>
		<th>request method</th>
		<th>resource</th>
		<th>response code</th>
		<th>request url</th>
		<th>os</th>
		<th>browser</th>
		<th>user agent</th>
		</tr>
    {% for accessLog in allreports %}
        <tr>
        <td>{{accessLog.site}}</td>
        <td>{{accessLog.ip_address}}</td>
        <td>{{accessLog.date_time}}</td>
        <td>{{accessLog.request_method}}</td>
        <td>{{accessLog.resource}}</td>
        <td>{{accessLog.response_code}}</td>
        <td>{{accessLog.request_url}}</td>
        <td>{{accessLog.os}}</td>
        <td>{{accessLog.browser}}</td>
        <td>{{accessLog.user_agent}}</td>
        </tr>
    {% endfor %}
    </table>
{% else %}
    <p>No logs are available.</p>
{% endif %}
{% endblock %}

